package com.ihr360.insurance.model.dto.benefits.embeddable;


import com.ihr360.commons.model.type.RoundType;
import com.ihr360.insurance.model.dto.benefits.IBenefitPaymentConfig;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

/**
 * 公司缴纳配置
 */
@Embeddable
public class CompanyPaymentConfig implements IBenefitPaymentConfig {
    private static final long serialVersionUID = -3217576832908632000L;

    /**
     * 基数上限
     */
    private int companyBaseMin;

    /**
     * 基数下限
     */
    private int companyBaseMax;

    /**
     * 比例
     */
    private int companyRatio;

    /**
     * 固定金额
     */
    private int companyAmount;

    /**
     * 小数规则
     */
    @Column(length = 20, nullable = false)
    @Enumerated(EnumType.STRING)
    private RoundType companyRoundType = RoundType.ROUND;

    /**
     * 小数位数
     */
    private int companyRoundBit;

    public int getCompanyBaseMin() {
        return companyBaseMin;
    }

    public void setCompanyBaseMin(int companyBaseMin) {
        this.companyBaseMin = companyBaseMin;
    }

    public int getCompanyBaseMax() {
        return companyBaseMax;
    }

    public void setCompanyBaseMax(int companyBaseMax) {
        this.companyBaseMax = companyBaseMax;
    }

    public int getCompanyRatio() {
        return companyRatio;
    }

    public void setCompanyRatio(int companyRatio) {
        this.companyRatio = companyRatio;
    }

    public int getCompanyAmount() {
        return companyAmount;
    }

    public void setCompanyAmount(int companyAmount) {
        this.companyAmount = companyAmount;
    }

    public RoundType getCompanyRoundType() {
        return companyRoundType;
    }

    public void setCompanyRoundType(RoundType companyRoundType) {
        this.companyRoundType = companyRoundType;
    }

    public int getCompanyRoundBit() {
        return companyRoundBit;
    }

    public void setCompanyRoundBit(int companyRoundBit) {
        this.companyRoundBit = companyRoundBit;
    }

    @Override
    public int getBaseMin() {
        return getCompanyBaseMin();
    }

    @Override
    public int getBaseMax() {
        return getCompanyBaseMax();
    }


    @Override
    public int getRatio() {
        return getCompanyRatio();
    }


    @Override
    public int getAmount() {
        return getCompanyAmount();
    }

    @Override
    public RoundType getRoundType() {
        return getCompanyRoundType();
    }

    @Override
    public int getRoundBit() {
        return getCompanyRoundBit();
    }


//    public void setBaseMin(int baseMin) {
//        this.setCompanyBaseMin(baseMin);
//    }
//
//    public void setBaseMax(int baseMax) {
//        this.setCompanyBaseMax(baseMax);
//    }
//
//    public void setRatio(int ratio) {
//        this.setCompanyRatio(ratio);
//    }
//
//    public void setAmount(int amount) {
//        this.setCompanyAmount(amount);
//    }
//
//    public void setRoundType(RoundType roundType) {
//        this.setCompanyRoundType(roundType);
//    }
//
//    public void setRoundBit(int roundBit) {
//        this.setCompanyRoundBit(roundBit);
//    }
}
